<?php
class Warehouse_Model_TakeStockAssignment
{

	private $_table;
	//Initalizing Db Table  
	public function __construct(){
		$this->_table = new Warehouse_Model_DbTable_TakeStockAssignment();
	}
	
	/**
	*Create A Record  
	*@param rowSet $row warehouse's data 
	*@return boolean
	*/
	public  function add($row)
	{	 
 		return $this->_table->insert($row); 
	}
	
	
	public function getByfield($field,$value){
		$where = $this->_table->getAdapter()->quoteInto("{$field} = ?",$value);	
		return $this->_table->fetchAll($where);
	}
	
	public function deleteByField($field,$value){	
		$where = $this->_table->getAdapter()->quoteInto("{$field} = ?",$value); 
		return $this->_table->delete($where);		
	}
	
}